


var utils = {};

/**
 * Returns a string of formatted numbers
 * @author Simon Auner 2011-12-02
 * 
 */
utils.numberFormat = function(number) {
    
    var str = number.toString(),
    rgx = /(\d+)(\d{3})/;
    
    while (rgx.test(str)) {
        str = str.replace(rgx, '$1' + ' ' + '$2');
    }
    return str;
};